package com.enki.cigarettes.enums;

/**
 * @author Glory
 * @version 1.0
 * @time 2018/12/27 15:00
 * @Description TODO 前台全局配置
 */
public class FrontGlobalConfig {
    /**
     * 位置类型
     * 1:广告语
     * 2:公告列表
     * 3:底部关于我们
     */
    public enum FrontType {
        AD("广告语", 1), AnnounceMent("公告列表", 2), ABOUTME("关于我们", 3);
        private String name;
        private int type;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        FrontType(String name, int type) {
            this.name = name;
            this.type = type;
        }

        public static String getName(int type) {
            for (FrontType ct : FrontType.values()) {
                if (ct.getType() == type) {
                    return ct.getName();
                }
            }
            return "";
        }
    }
}
